Newer BIOS implementations will be able to disable the SVM feature,
although an additional test of an MSR (VMCR 0xC0010114 bit 4) is
necessary (set equals disabled). Bit 4 of MSR 0xc0010114 returns 0
(SVM enabled) on machines with older BIOS' without the SVM disable
feature support.
Signed-off-by: Wei Huang <wei.huang2@amd.com>=20
Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
if (!(test_bit(X86_FEATURE_SVME, &boot_cpu_data.x86_capability)))
return 0;
+
+ /* check whether SVM feature is disabled in BIOS */
+ rdmsr(0xC0010114, eax, edx);
+ if ( eax & 0x00000010 ) {
+ printk("AMD SVM Extension is disabled in BIOS.\n");
+ return 0;
+ }
if (!(hsa[cpu] = alloc_host_save_area()))
return 0;